home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
propage
/
genies
/
frenchgenies
/
rexx
/
copieretrépéterrelié.pprx
< prev
next >
Wrap
Text File
|
1993-08-03
|
3KB
|
102 lines
/*
@BCopierEtRépéterRelié @P@ICopyright Gold Disk Inc., Février 1992
Modifié par Don Cox.
Ce Genie permet de créer plusieurs copies d'une même boîte en spécifiant la distance et l'angle entre ces différentes copies. Les boîtes sont reliées.
*/
cr = '0a'x
address command
call SafeEndEdit.rexx()
units = ppm_GetUnits()
if units = 3 then
call ppm_SetUnits(1)
signal on halt
signal on break_c
signal on break_e
signal on break_d
form = "Colonnes"cr"Rangées"cr"Gouttière"
/* This Genie allows user to duplicate, move and rotate a box
* in one step
*/
box = ppm_ClickOnBox("Cliquez sur la boîte à copier...")
if box = 0 then exit_msg()
dup = 0
boxpos = ppm_GetBoxPosition(box)
cur_x = word(boxpos, 1 )
cur_y = word(boxpos, 2 )
boxsize = ppm_GetBoxSize(box)
width = word(boxsize, 1 )
height = word(boxsize, 2 )
if units = 3 then
do
call ppm_ShowStatus("Position: " || ppm_ConvertUnits(1, 3, cur_x) || ", " || ppm_ConvertUnits(1, 3, cur_y) || " taille: l" || ppm_ConvertUnits(1, 3, width) || ", h" || ppm_ConvertUnits(1, 3, height))
form = "Nombre de copies:1"cr"Distance horizontale:" || ppm_ConvertUnits(1, 3, width)||cr"Distance verticale:" || ppm_ConvertUnits(1, 3, height)||cr"Angle"
end
else
do
call ppm_ShowStatus("Position: "cur_x", "cur_y" taille: l"width", h"height)
form ="Nombre de copies:1"cr"Distance horizontale:"width||cr"Distance verticale:"height||cr"Angle"
end
form = ppm_GetForm("Sélection des options", 8, form)
if form = '' then exit_msg()
parse var form count '0a'x horizontal '0a'x vertical '0a'x angle
if count = '' then count = 1
if horizontal = '' then horizontal = 0
if vertical = '' then vertical = 0
if angle = '' then angle = 0
if ~(datatype(count, n) & datatype(horizontal, n) & datatype(vertical, n) & datatype(angle, n)) then exit_msg("Saisie incorrecte")
if units = 3 then
do
horizontal = ppm_ConvertUnits(3, 1, horizontal)
vertical = ppm_ConvertUnits(3, 1, vertical)
end
call ppm_AutoUpdate(0)
rotationangle = angle
do i = 1 to count
newbox = ppm_CloneBox(box, horizontal, vertical)
linked = ppm_LinkBox(box,newbox)
if angle ~= 0 then
do
call ppm_SetBoxAngle(newbox, rotationangle)
rotationangle = rotationangle + angle
end
box = newbox
end
exit_msg()
break_d:
break_e:
break_c:
halt:
call exit_msg("Abandon du Genie par l'utilisateur !")
exit_msg: procedure expose units
do
parse arg message
if message ~= '' then call ppm_Inform(1, message,)
call ppm_ClearStatus()
if units = 3 then call ppm_SetUnits(3)
call ppm_AutoUpdate(1)
exit
end